//
//  NetWork.h
//  OnlineVideoEducation
//
//  Created by qiaofeng wu on 2018/2/23.
//  Copyright © 2018年 jiangwei. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>
#import <Foundation/Foundation.h>

/** 成功回调 */
typedef void(^SuccessCompletedBlock)(id responseObject);

/** 失败回调 */
typedef void(^FailureCompletedBlock)(NSError *error);

@interface NetWork : AFHTTPSessionManager
+ (instancetype)shareManager;

/** 自定义的 POST 请求 */
+ (void)POSTWithUrlString:(NSString *)urlString
                   parmas:(NSDictionary *)params
            successBloock:(SuccessCompletedBlock)success
             failureBlock:(FailureCompletedBlock)failure;

/** 自定义的 GET 请求 */
+ (void)GETWithUrlString:(NSString *)urlString
                          parmas:(NSDictionary *)params
                   successBloock:(SuccessCompletedBlock)success
                    failureBlock:(FailureCompletedBlock)failure;

/** 上传图片 */
+ (void)uploadUrl:(NSString *)url img:(NSArray *)imgs
           pramas:(NSDictionary *)prams
    successBloock:(SuccessCompletedBlock)success
     failureBlock:(FailureCompletedBlock)failure;
@end
